onLogin

Description

Fires when the user clicks the 'Login' button on the login dialog.

Discussion

The onLogin server-side event fires when the uer tries to login. The event is passed an object e that contains information about whether or not the user successfully logged in. This method can be used to set session variables or message displayed in the {userName} placeholder.

Arguments

ePointer

A dot variable that contains information about the Tabbed UI component. e has the following properties:

usernameCharacter

The user name entered by user to log in.

loginSucceededLogical

Either .t. or .f. depending on whether the user was successfully logged in or not.

flagUserWasAlreadyLoggedInLogical

If the user was already logged in when the page was initially loaded, this flag is .t.

errorTextCharacter

The error message if login failed.

tmplPointer

The component definition for the Tabbed UI.

userNameFriendlyCharacter

The value that will be used to replace the {userName} placeholder in the Logged In Message Template. If you do not set this property, the user name will be used.

javascriptCharacter

Use this variable to send JavaScript back to the client.

eventDataObjectJSON

Data to send back to the client that will be available in the client-side afterLogin event. Data set in the eventDataObject property must be in a JSON format.

Setting Data Values

This event can set data values that will be available when the client-side afterLogin event fires.

For example:

e.eventDataObject = "{userName: '"+e.userName+"', var2: 'some other value', timeOfLogin: '"+js_escape("" + now())+"'}"

In the client-side afterLogin event you can refer to any value in the eventDataObject. For example, to reference the userName value in created in the example above:

alert('Welcome: ' + e.eventDataObject.userName);